package com.example.class1.Service.impl;

import com.example.class1.Mapper.JobDao;
import com.example.class1.Service.JobService;
import com.example.class1.entity.Job;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class JobServiceImpl implements JobService {
    @Autowired
    JobDao jobDao;

    @Override
    public List<Job> select() {
        return jobDao.selectList(null);
    }

    @Override
    public int add(Job job) {
        return jobDao.insert(job);
    }

    @Override
    public int delete(Integer id) {
        return jobDao.deleteById(id);
    }

    @Override
    public int update(Job job) {
        return jobDao.updateById(job);
    }

    @Override
    public List<Job> find() {
        return jobDao.find();
    }
}
